package com.nuclearwm.nuclear;

import java.util.Timer;

import com.nuclearwm.nuclear.R.layout;

import android.os.Bundle;
import android.os.Handler;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.text.Layout;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.RelativeLayout;

public class MainActivity extends Activity {
	private LayoutInflater layoutInflater;
	private View activity_main;
	private RelativeLayout logo_background;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		//for FEATURE_NO_TITLE and FLAG_FULLSCREEN, android:theme="@android:style/Theme.NoTitleBar.Fullscreen" has been written into AndroidManifest.xml
        //requestWindowFeature(Window.FEATURE_NO_TITLE);                    
        //去掉Activity上面的状态栏 
        //getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams. FLAG_FULLSCREEN); 
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);//强制为横屏
		setContentView(R.layout.activity_main);

		RelativeLayout logo_background = (RelativeLayout) findViewById(R.id.layout_logo_background);
		logo_background.setBackgroundResource(R.drawable.logo_background);

		new Handler().postDelayed(new Runnable() {
			public void run() {
				Intent menuIntent = new Intent("com.nuclearwm.MENU");
				startActivity(menuIntent);
				MainActivity.this.finish();
			}

		}, 2000);//1s
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
